﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 激光。有一条拖尾。会自动消失
/// 以恒定速度前进
/// </summary>
public class ShotRay : Shots
{
    [SerializeField,Tooltip("移动速度")]
    protected Vector3 velocity=new Vector3(0,0,0);

    /// <summary>
    /// 内部移动方式
    /// </summary>
    /// <param name="startStatu"></param>
    protected override void Move(Vector3 startStatu)
    {
        velocity = startStatu;
    }


    /// <summary>
    /// 速度更新
    /// </summary>
    protected virtual void Update()
    {
        transform.position = transform.position + velocity * Time.deltaTime;
    }
}
